classdef SimpleIndividual < Individual
    %UNTITLED Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function obj = SimpleIndividual()
            % superclass constructor is called implicitly
            obj.objective_counter = SimpleObjectiveCounter();
            
        end
        
        
        function obj = generate_individual(ind,pop)
            obj = SimpleIndividual();
            obj.stops_handle = pop.stops;
            obj.b = ind.b;
            
            density = 0.1; % TODO: refactor (should be population parameter?)
            
            obj.connections = random_connections( pop.stops.number, density );
            
            % wykres grafu z dlugosciami polaczen
            %obj.connections = obj.stops.distances.* random_connections( obj.stops.number, density ); 
            obj.connections = random_connections( pop.stops.number, density );
        end
        
        function obj = new(ind,pop)
            obj = SimpleIndividual();
            obj.b = ind.b;
            obj.stops_handle = pop.stops;
        end
    end
    
    methods(Static)
        
        
        
        
    end
    
end

